<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{:session('conf.title')}</title>
  <meta name="description" content="这是一个 index 页面">
  <meta name="keywords" content="index">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="__ADMIN__/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="__ADMIN__/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="__ADMIN__/css/amazeui.min.css"/>
  <link rel="stylesheet" href="__ADMIN__/css/admin.css">
  <script src="__ADMIN__/js/jquery.min.js"></script>
  <script type="text/javascript" src="__ADMIN__/layer/layer.js"></script>
  <script type="text/javascript" src="/static/jqusey.form.js"></script>
</head>

<body>
    <div class="am-cf admin-main">
        <div class="admin-content am-padding">
            <div class="am-g">
                <form class="am-form am-form-horizontal" method="post" action="{:U('picture/update')}" id="conf_update">
                    <div class="am-form-group">
                      <label for="user-name" class="am-u-sm-2 am-form-label">图片名称</label>
                      <div class="am-u-sm-10">
                        <input type="text" id="user-name" placeholder="" name="pname" value="{$res.pname}">
                        <!-- <small>输入你的名字，让我们记住你。</small> -->
                      </div>
                    </div>
                    <div class="am-form-group">
                      <label for="user-name" class="am-u-sm-2 am-form-label">显示排序</label>
                      <div class="am-u-sm-10">
                        <input type="text" id="user-name" placeholder="" name="sort" value="{$res.sort}">
                        <!-- <small>输入你的名字，让我们记住你。</small> -->
                      </div>
                    </div>
                    <div class="am-form-group">
                      <div class="am-u-sm-10 am-u-sm-push-2">
                          <input type="hidden" name="update_time" value="{:time()}">
                          <input type="hidden" name="pid" value="{$res.id}">
                          <input type="submit" class="am-btn am-btn-primary" value="保存修改">
                      </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
<script type="text/javascript">
$('#conf_update').submit(function() {
    var index = layer.load(2);
    $(this).ajaxSubmit(function(data){
        layer.close(index);
        if(data == 1){
            layer.msg('更新成功。。。', {icon:1,time: 2000},function(){
                parent.location.reload();
            });
        }else{
            layer.alert(data,{
                icon:2,
            });
        }
    })
    return false;
})
</script>
</html>
